#!/bin/bash

#iptables -t filter -A INPUT -s 192.168.0.1 -j DROP
#iptables -t nat -A PREROUTING  -s 192.168.0.1 -j DROP

if [ $# -ne 1 ]; then
   echo "Usage: $0 ip_address"
   exit 1;
fi

mac_addr=`grep $1 mac.addr | awk '{ print $2 }' -`
iptables -t raw -A PREROUTING -m mac --mac-source $mac_addr -j DROP
#iptables -t raw -L
